//
//  BoardViewController.h
//  MazeG
//
//  Created by cdh on 11/2/09.
//  Copyright 2009 __MyCompanyName__. All rights reserved.
//

#import <UIKit/UIKit.h>


@interface BoardViewController : UIViewController <UIAccelerometerDelegate>{
	NSInteger gameState;
	NSInteger score;
	IBOutlet UIImageView * theBall;
	IBOutlet UIImageView * backgroundImage;
	IBOutlet UIImageView * goalHole;
	IBOutlet UILabel * player_score;
	IBOutlet UILabel * tapToBegin;
	CGPoint startPosition;	
	CGPoint ballVelocity;
	CGPoint startTouchPosition;
	CGPoint bounceVelocity;
}

@property (nonatomic) NSInteger gameState;
@property (nonatomic, retain) IBOutlet UIImageView * theBall;
@property (nonatomic, retain) IBOutlet UIImageView * goalHole;
@property (nonatomic, retain) IBOutlet UILabel * player_score;
@property (nonatomic, retain) IBOutlet UILabel *tapToBegin;

@property (nonatomic) CGPoint startPosition;
@property(nonatomic) CGPoint ballVelocity;
@property(nonatomic) CGPoint startTouchPosition;

- (void) setupBoardView;
- (void) updateBallPosition: (CGFloat) x :(CGFloat) y;
- (void) configureAccelerometer;
- (IBAction) endGame;
- (void) gameLoop;

@end
